<!DOCTYPE html>
<html>
  <head>
    <title>Death project</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap -->
    <link href="<?php echo base_url()?>public/css/bootstrap.min.css" rel="stylesheet" media="screen">
    <link href="<?php echo base_url()?>public/css/style.css" rel="stylesheet" media="screen">
    <link href="<?php echo base_url()?>public/css/font-awesome.css" rel="stylesheet" media="screen">
    <!-- JavaScript plugins (requires jQuery) -->
    <script src="http://code.jquery.com/jquery.js"></script>
    <script type="text/javascript" src="<?php echo base_url()?>public/js/leanModal/jquery.leanModal.min.js"></script>
    <script type="text/javascript">
    	var baseUrlJs = '<?php echo base_url()?>';
    	$(document).ready(function(){
    		$('#show-pop-login').leanModal();
    	});
    </script>
  </head>
  <body>
    <div class="navbar navbar-inverse navbar-fixed-top bs-docs-nav header">
      <div class="container">
        	<a href="../" class="navbar-brand">LOGO</a>
        	<div class="col-lg-5 col-lg-offset-6">
       		
        	</div>
       </div>
    </div>

    <div class="main-landing">
    	<div class="container">
    		<div class="row">
    			<form>
	    			<div class="col-lg-8 col-lg-offset-2">
	    				<h1>Welcome to our site</h1>
	    				<h3>Please update info your account</h3>
	    				<p>
	    					<!--<a href="#upload_avatar" rel="leanModal" class="btn btn-primary">Upload your avatar</a-->
                            <a href="#upload_avatar" rel="leanModal">
                            <div class="thumbnail" style="width:110px">
                              <img data-src="holder.js/100x80" alt="" id="avatar_after_upload">
                            </div>
                            </a>
	    				</p>
	    				<p>
	    					<input type="text" id="fullname" placeholder="Fullname" class="form-control">
	    				</p>
	    				<p>
	    					<input type="password" id="password" placeholder="Password" class="form-control">
	    				</p>
	    				<p>
	    					<a href="javascript:void(1)" class="btn btn-primary" onclick="action_step1()">Submit</a>
	    				</p>
	    				<p>
    						<img src="<?php echo base_url()?>public/image/ajax-loader.gif" alt="Loading" id="show_load_1" style="display:none">
    					</p>
    					<input type="hidden" id="hide_code" value="<?php echo $code_confirm?>">
	    			</div>
    			</form>
    		</div>
    	</div>
    </div>

<script src="<?php echo base_url()?>public/upload_lib/jquery.uploadify.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="<?php echo base_url()?>public/upload_lib/uploadify.css">
<div style="display:none; height:400px" id="upload_avatar" class="box-lean-modal">
      <div id="signup-ct">
        <div class="signup-header">
          <h2>Upload your avatar</h2>
          <a class="modal_close" href="#"><i class="icon-remove"></i></a>
        </div>
      </div>
    <form style="margin-left:20px" enctype="multipart/form-data">

      <div id="notify"></div>
      <div id="queue"></div>
      <input id="file_upload" name="file_upload" type="file" multiple="true">
    </form>
 
</div>

<script type="text/javascript">
    <?php 
        $timestamp = time();
        //$curUserName = $this->session->userdata('sess_username');
        //$curUserId = $this->session->userdata('sess_userid');
    ?>
    $(function() {
      $('#file_upload').uploadify({
        'formData'      : {
            'code_confirm' : '<?php echo $code_confirm; ?>'
        },
        'swf'      : '<?php echo base_url()?>public/upload_lib/uploadify.swf',
        'uploader' : baseUrlJs + 'register/upload_avatar',
        //'debug'    : true,
        'fileObjName' : 'userfile',
        'multi': false,
        'fileSizeLimit':'2048KB',
        'cancelImg': '<?php echo base_url()?>public/upload_lib/uploadify-cancel.png',
        'removeCompleted':false,
        'onUploadSuccess' : function(file, data, response) {
            //alert('The file ' + file.name + ' was successfully uploaded with a response of ' + response + ':' + data);
            var json = jQuery.parseJSON(data);
            var image_src = "<?php echo base_url()?>data_uploads/avatar/" + json.file_name;
            //alert(json.file_name);
            $('#avatar_after_upload').attr('src', image_src);
            //$('.orther_avata').load(baseUrlJs + "ajax/loadListAvatar");
        },
        'onComplete' : function(event, ID, fileObj, response, data) {
            //$("#notify").html(response);
            //alert(data.file_name);
         }
      });
    });
  </script>

    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="<?php echo base_url()?>public/js/bootstrap.min.js"></script>
    <script type="text/javascript">
    	$(document).ready(function(){
    		$("a[rel*=leanModal]").leanModal({closeButton: ".modal_close"});
    	})
    </script>
    <!-- Enable responsive features in IE8 with Respond.js (https://github.com/scottjehl/Respond) -->
    <script src="<?php echo base_url()?>public/js/respond.js"></script>
    <script src="<?php echo base_url()?>public/js/holder.js"></script>
    <script src="<?php echo base_url()?>public/js/common.js"></script>
  </body>
</html>